﻿using Microsoft.Extensions.Configuration;
using System.Collections.Specialized;
using System.Configuration;

namespace MiniFox.Web.Configurations
{
    /// <summary>
    /// 
    /// </summary>
    public sealed class ViaAgent
    {
        const string NAME = "name";
        const string DEFAULT_URL = "defaultUrl";
        const string URL_MAPPING = "urlMappings";
        /// <summary>
        /// 
        /// </summary>
        public ViaAgent() { }

        /// <summary>
        /// 唯一标识
        /// </summary>
        [ConfigurationKeyName(NAME)]
        public string Name
        {
            get;
            set;
        }

        /// <summary>
        /// 默认跳转地址
        /// </summary>
        [ConfigurationKeyName(DEFAULT_URL)]
        public string DefaultUrl
        {
            get;
            set;
        }

        /// <summary>
        /// 
        /// </summary>    
        [ConfigurationKeyName(URL_MAPPING)]
        public Dictionary<string, string> UrlMappings
        {
            get;
            set;
        } = new();
    }
}
